#ifndef ONETWO_H
#define ONETWO_H

#include <QGraphicsScene>
#include <QGraphicsItem>
#include <QPainter>
#include <QMovie>

class Onetwo : public QGraphicsItem
{
public:
    Onetwo();
    int hp;
    int state;
    enum{ Type = UserType + 1};
    ~Onetwo() override;
    QRectF boundingRect() const override;
    void paint(QPainter *painter,const QStyleOptionGraphicsItem *option, QWidget *widget)override;
    bool collidesWithItem(const QGraphicsItem *other, Qt::ItemSelectionMode mode) const override;
    int type() const override;
    void setMovie(QString path);

protected:
    QMovie *movie;
    int atk;
    int counter;
    int time;
};

#endif // ONETWO_H
